#pragma once
#include <QThread>
#include <QMutex>
#include <QWaitCondition>
#include "UDPSocketWorker.h"
#include "SendThread.h"

class UDPSocketThread : public QThread
{
    Q_OBJECT
public:
    static const int WAITSECONDS= 2;
    UDPSocketThread(QObject* par = nullptr);
    ~UDPSocketThread();

    void sendMessage(const MSG &message);

signals:
    void messageEnqueued();

protected:
    void run() override;

private:
    UDPSocketWorker *worker;
    SendThread* send;
};
